package mysql

import "gorm.io/gorm"

type Goods struct {
	gorm.Model
	GoodsTitle  string `gorm:"type:varchar(50);comment:商品标题"`
	GoodsPrice  int    `gorm:"type:int(11);comment:商品价格"`
	GoodsStatus int    `gorm:"type:int(1);comment:商品状态"`
	GoodsCover  string `gorm:"type:varchar(255);comment:商品封面"`
	GoodsTypes  int    `gorm:"type:int(2);comment:商品类型"`
}

func (c *Goods) FindInIdByGoods(id int64) error {
	return Db.Where("id", id).Find(&c).Error
}
